Integrand size = 27, antiderivative size = 208 \[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+a \sec (e+f x)} \, dx=\frac {\left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f (a+a \sec (e+f x))}-\frac {\cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (1-n p),\frac {1}{2} (3-n p),\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{a f \sqrt {\sin ^2(e+f x)}}+\frac {(1-n p) \cos ^2(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (2-n p),\frac {1}{2} (4-n p),\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{a f (2-n p) \sqrt {\sin ^2(e+f x)}} \]
[Out]
Time = 0.33 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {4033, 3905, 3872, 3857, 2722} \[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+a \sec (e+f x)} \, dx=-\frac {\sin (e+f x) \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (1-n p),\frac {1}{2} (3-n p),\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{a f \sqrt {\sin ^2(e+f x)}}+\frac {(1-n p) \sin (e+f x) \cos ^2(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (2-n p),\frac {1}{2} (4-n p),\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{a f (2-n p) \sqrt {\sin ^2(e+f x)}}+\frac {\sin (e+f x) \left (c (d \sec (e+f x))^p\right )^n}{f (a \sec (e+f x)+a)} \]
[In]
[Out]
Rule 2722
Rule 3857
Rule 3872
Rule 3905
Rule 4033
Rubi steps \begin{align*} \text {integral}& = \left ((d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac {(d \sec (e+f x))^{n p}}{a+a \sec (e+f x)} \, dx \\ & = \frac {\left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f (a+a \sec (e+f x))}-\frac {\left (d (1-n p) (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{-1+n p} (a-a \sec (e+f x)) \, dx}{a^2} \\ & = \frac {\left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f (a+a \sec (e+f x))}+\frac {\left ((1-n p) (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{n p} \, dx}{a}-\frac {\left (d (1-n p) (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{-1+n p} \, dx}{a} \\ & = \frac {\left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f (a+a \sec (e+f x))}+\frac {\left ((1-n p) \left (\frac {\cos (e+f x)}{d}\right )^{n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^{-n p} \, dx}{a}-\frac {\left (d (1-n p) \left (\frac {\cos (e+f x)}{d}\right )^{n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^{1-n p} \, dx}{a} \\ & = \frac {\left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f (a+a \sec (e+f x))}-\frac {\cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (1-n p),\frac {1}{2} (3-n p),\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{a f \sqrt {\sin ^2(e+f x)}}+\frac {(1-n p) \cos ^2(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (2-n p),\frac {1}{2} (4-n p),\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{a f (2-n p) \sqrt {\sin ^2(e+f x)}} \\ \end{align*}
Time = 0.63 (sec) , antiderivative size = 159, normalized size of antiderivative = 0.76 \[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+a \sec (e+f x)} \, dx=\frac {\cot \left (\frac {1}{2} (e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \left (-\left ((-1+n p) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n p}{2},1+\frac {n p}{2},\sec ^2(e+f x)\right ) \sqrt {-\tan ^2(e+f x)}\right )+n p \left (1-\cos (e+f x)+\cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-1+n p),\frac {1}{2} (1+n p),\sec ^2(e+f x)\right ) \sqrt {-\tan ^2(e+f x)}\right )\right )}{a f n p (1+\sec (e+f x))} \]
[In]
[Out]
\[\int \frac {\left (c \left (d \sec \left (f x +e \right )\right )^{p}\right )^{n}}{a +a \sec \left (f x +e \right )}d x\]
[In]
[Out]
\[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+a \sec (e+f x)} \, dx=\int { \frac {\left (\left (d \sec \left (f x + e\right )\right )^{p} c\right )^{n}}{a \sec \left (f x + e\right ) + a} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+a \sec (e+f x)} \, dx=\frac {\int \frac {\left (c \left (d \sec {\left (e + f x \right )}\right )^{p}\right )^{n}}{\sec {\left (e + f x \right )} + 1}\, dx}{a} \]
[In]
[Out]
\[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+a \sec (e+f x)} \, dx=\int { \frac {\left (\left (d \sec \left (f x + e\right )\right )^{p} c\right )^{n}}{a \sec \left (f x + e\right ) + a} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+a \sec (e+f x)} \, dx=\int { \frac {\left (\left (d \sec \left (f x + e\right )\right )^{p} c\right )^{n}}{a \sec \left (f x + e\right ) + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{a+a \sec (e+f x)} \, dx=\int \frac {{\left (c\,{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^p\right )}^n}{a+\frac {a}{\cos \left (e+f\,x\right )}} \,d x \]
[In]
[Out]